unit Form_Mino;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,View_Original, StdCtrls,Dialog_View, ExtCtrls, RzButton, RzPanel,
  Menus, AdvMenus, ElMenus;

type
  TFormMino = class(TViewOriginal)
    Btnx_1: TButton;
    Btnx_2: TButton;
    Btnx_3: TButton;
    Btnx_4: TButton;
    grp1: TGroupBox;
    Panl_1: TPanel;
    Tool_1: TRzToolbar;
    Btnx_8: TButton;
    Btnx_9: TButton;
    Btnx_10: TButton;
    Btnx_11: TButton;
    Btnx_12: TButton;
    Btnx_13: TButton;
    Btnx_14: TButton;
    Btnx_15: TRzBitBtn;
    PopupMenu1: TPopupMenu;
    Menu_1: TMainMenu;
    Menu_N1: TMenuItem;
    Menu_N2: TMenuItem;
    Menu_A1: TMenuItem;
    B1: TMenuItem;
    pm1: TPopupMenu;
    testb1: TMenuItem;
    testc1: TMenuItem;
    A1: TMenuItem;
    A2: TMenuItem;
    A3: TMenuItem;
    A4: TMenuItem;
    procedure Btnx_5Click(Sender: TObject);
    procedure Btnx_4Click(Sender: TObject);
    procedure Btnx_3Click(Sender: TObject);
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
    procedure Btnx_6Click(Sender: TObject);
    procedure Btnx_16Click(Sender: TObject);
    procedure Btnx_15Click(Sender: TObject);
  private
    procedure WMMENUSELECT(var msg:TWMMENUSELECT);message WM_MENUSELECT;  
  public
  end;

var
  FormMino: TFormMino;

implementation

uses
  Class_KzDebug;

{$R *.dfm}

{ TFormMino }




procedure TFormMino.Btnx_5Click(Sender: TObject);
begin
  inherited;
  ShowMessage(TButton(Sender).Name);
end;


procedure TFormMino.Btnx_4Click(Sender: TObject);
begin
  inherited;
  ShowMessage(TButton(Sender).Name);
  ShowMessage('i can not be click');
end;

procedure TFormMino.Btnx_3Click(Sender: TObject);
begin
  inherited;
  ShowMessage(TButton(Sender).Name);
end;

procedure TFormMino.Btnx_1Click(Sender: TObject);
begin
  inherited;
  ShowMessage(TButton(Sender).Name);
end;

procedure TFormMino.Btnx_2Click(Sender: TObject);
begin
  inherited;
  ShowMessage(TButton(Sender).Name);
end;

procedure TFormMino.Btnx_6Click(Sender: TObject);
begin
  inherited;
  //ShowMessage(TButton(Sender).Name);


  //ShowMessageFmt('%D:',[Btnx_6.DownIndex]);
end;

procedure TFormMino.Btnx_16Click(Sender: TObject);
begin
  inherited;
  //ShowMessage(TButton(Sender).Name);


  //ShowMessageFmt('%D:',[Btnx_6.DownIndex]);
end;

procedure TFormMino.WMMENUSELECT(var msg: TWMMENUSELECT);
begin
  //ShowMessage('procedure WMMENUSELECT(var msg:TWMMENUSELECT);message WM_MENUSELECT;');
end;

procedure TFormMino.Btnx_15Click(Sender: TObject);
var
  P:TPoint;
begin
  inherited;
  P.X:=btnx_15.Left;
  P.Y:=Btnx_15.Top;
  P:=ClientToScreen(P);
  pm1.Popup(P.X,P.Y+btnx_15.Height);
end;

initialization
begin
  RegisterPermission(TFormMino,FormMino);
end;
end.
